package com.md.tw.service;

import com.md.tw.dao.StudentDao;
import com.md.tw.entity.Student;
import lombok.Data;

@Data
public class StudentServiceImpl implements StudentService{

    private StudentDao studentDao ;

    @Override
    public Student QueryStudentById(int id) {
        Student student = studentDao.QueryStudentById(id);
        return student;
    }

    @Override
    public int delStudentById(int id) {
        int i = studentDao.DeleteStudentById(id);
        if(i>0){
            System.out.println("删除成功");
        }else {
            System.out.println("删除失败");
        }
        return 0 ;
    }
}
